import {RequestUtil} from '@/utils'

export class PopBasicHttp {
    static PREFIX = "/manager/pop"


    static getLinkList = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/basic/link/pageList`, params)

    static addLink = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/basic/link/add`, data)

    static updateLink = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/basic/link/update/${id}`, data)

    static delLink = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/basic/link/delete`, data)


    // 海报管理


    static getPosterList = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/basic/poster/pageList`, params)

    static addPoster = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/basic/poster/add`, data)

    static updatePoster = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/basic/poster/update/${id}`, data)

    static delPoster = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/basic/poster/delete`, data)


    // 礼包管理

    static getDiamondList = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/basic/diamond/pageList`, params)

    static addDiamond = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/basic/diamond/add`, data)

    static updateDiamond = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/basic/diamond/update/${id}`, data)

    static delDiamond = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/basic/diamond/delete`, data)



    static getDiamondLogsList = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/basic/diamondLogs/pageList`, params)
}
